function maskPII(s: string): string {
    const at: number = s.indexOf("@");
    if (at >= 0) {
        // webstorm 没报错提示，但是leetcode报错的！
        // console.log("*" * 5);
        // return (s[0] + '*' * 5 + s.substring(at-1)).toLowerCase();
        return (s[0] + "*****" + s.substring(at-1)).toLowerCase();
    }
    let sb: string = "";
    for (let i=0; i<s.length; ++i) {
        const c: string = s.charAt(i);
        if ('0' <= c && c <= '9') {
            sb += c;
        }
    }
    s = sb.toString();
    const country: Array<string> = ["", "+*-", "+**-", "+***-"];
    return country[s.length-10] + "***-***-" + s.substring(s.length-4);
}

// webstorm 对ts不支持，右键不可以运行!

